-- GENERATED SPELL FOR [Blackhand Summoner] --


function spell0_9818(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9818', 3000, 1)
end

function spell1_9818(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_9818', 8307, 1)
end

function spell2_9818(pUnit, Event) --@Summon Blackhand Dreadweaver,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15794,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_9818', 1, 1)
end

function spell3_9818(pUnit, Event) --@Summon Blackhand Veteran,n/a--
pUnit:FullCastSpellOnTarget(15792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9818', 5000, 1)
end

function Sorts_9818(pUnit, Event)
local choix_sorts_9818 = math.random(0, 3)
if choix_sorts_9818 == 0 then
pUnit:RegisterEvent('spell0_9818', 1, 1)
end
if choix_sorts_9818 == 1 then
pUnit:RegisterEvent('spell1_9818', 1, 1)
end
if choix_sorts_9818 == 2 then
pUnit:RegisterEvent('spell2_9818', 1, 1)
end
if choix_sorts_9818 == 3 then
pUnit:RegisterEvent('spell3_9818', 1, 1)
end
end

function mob9818_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9818', math.random(1500, 3000), 1)
end

function mob9818_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9818_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9818_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9818, 1, 'mob9818_Action')
RegisterUnitEvent(9818, 2, 'mob9818_Leave')
RegisterUnitEvent(9818, 3, 'mob9818_Kill')
RegisterUnitEvent(9818, 4, 'mob9818_Die')
